//
//  SWSound.swift
//  ChildStory
//
//  Created by linhan on 16/9/22.
//  Copyright © 2016年 Aiya. All rights reserved.
//

import Foundation

enum SWSoundFile
{
    case bird
    case cat
    case drum
    case duck
    case flute
    case koala
    case ring
    
    var file:String{
        switch self {
        case .bird: return "bird.mp3"
        case .cat: return "cat.mp3"
        case .drum: return "drum.mp3"
        case .duck: return "duck.mp3"
        case .flute: return "flute.mp3"
        case .koala: return "koala.mp3"
        case .ring: return "ring.mp3"
        }
    }
}

extension SWSoundPlayer
{
    static func play(file:SWSoundFile, times:Int = 1)
    {
        SWSoundPlayer.playSound(file.file, times:times)
    }
}
